package spring.framework.beans.factory.config;

import spring.framework.beans.BeansException;
import spring.framework.beans.factory.BeanFactory;

/**
 * @author fun.pengzh
 * @class spring.framework.beans.factory.config.AutowireCapableBeanFactory
 * @desc
 * @since 2021-10-07
 */
public interface AutowireCapableBeanFactory extends BeanFactory {

    /**
     * 执行 BeanPostProcessors 接口实现类的 postProcessBeforeInitialization 方法
     *
     * @param existingBean
     * @param beanName
     * @return
     * @throws BeansException
     */  //apllyBeanPostProcessorsBeforeInitialization
    Object applyBeanPostProcessorsBeforeInitialization(Object existingBean, String beanName) throws BeansException;

    /**
     * 执行 BeanPostProcessors 接口实现类的 postProcessorsAfterInitialization 方法
     *
     * @param existingBean
     * @param beanName
     * @return
     * @throws BeansException
     */
    Object applyBeanPostProcessorsAfterInitialization(Object existingBean, String beanName) throws BeansException;

}
